package com.letoken.platform.repo.admin.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * Le账户-用户充值订单表
 * </p>
 *
 * @author 作者
 * @since 2022-12-12
 */
@Getter
@Setter
@TableName("app_user_recharge")
@ApiModel(value = "AppUserRecharge对象", description = "Le账户-用户充值订单表")
public class AppUserRecharge extends Model<AppUserRecharge> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("网络类型(bsc/eth)")
    @TableField("net_typ")
    private String netTyp;

    @ApiModelProperty("代币id")
    @TableField("token_id")
    private Integer tokenId;

    @ApiModelProperty("所属用户id")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("用户平台内钱包地址")
    @TableField("le_address")
    private String leAddress;

    @ApiModelProperty("来源(0系统 1链上)")
    @TableField("source")
    private Integer source;

    @ApiModelProperty("交易hash")
    @TableField("txid")
    private String txid;

    @ApiModelProperty("金额（精度18）")
    @TableField("amount")
    private BigDecimal amount;

    @ApiModelProperty("创建时间(格林尼治时间)")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("确认时间")
    @TableField("process_time")
    private LocalDateTime processTime;

    @ApiModelProperty("*状态，0待处理,1处理中,2已处理 3 失败")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("订单流水号")
    @TableField("sn")
    private String sn;

    @ApiModelProperty("已确认区块数量")
    @TableField("confirms")
    private Integer confirms;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
